package br.dcc.ufmg.domain;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Class extends Measure {
	
	private String name;
	
	private String source;
	
	private Package package_;
	
	public String getIdentifier() {
		return "Name: " + name + ", Source: " + source + ", Package: " + package_.getName();
	}
	
	public static Class createClass(ResultSet rs)
			throws SQLException {
		Package package_ = new Package();
		package_.setName(rs.getString("package"));
		Class class_ = new Class();
		class_.setSource(rs.getString("source"));
		class_.setPackage_(package_);
		class_.setName(rs.getString("name"));
		return class_;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Package getPackage_() {
		return package_;
	}

	public void setPackage_(Package package_) {
		this.package_ = package_;
	}
	
}
